﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Happy.Query.Filters.Internal
{
    internal static class ConnectorExtentions
    {
        private static readonly Dictionary<Connector, string> _SqlFragments = new Dictionary<Connector, string>
        {
            { Connector.Empty, "(" },
            { Connector.Not, " NOT (" },
            { Connector.And, " AND (" },
            { Connector.Or, " OR (" },
            { Connector.AndNot, " AND NOT (" },
            { Connector.OrNot, " OR NOT (" }
        };

        public static string ToSqlFragment(this Connector that)
        {
            return _SqlFragments[that];
        }
    }
}
